package com.itheima.d1_char_stream;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.Writer;

public class FileWriteTest2 {
    public static void main(String[] args) {
        try (
                Writer fw = new FileWriter("Day18-io-app\\src\\itheima02.txt",true);

        ) {
            fw.write('a');
            fw.write(97);
            fw.write('斌');
            fw.write("\r\n");


            fw.write("谢睿妍小傻蛋22");
            fw.write("\r\n");
            fw.write("谢睿妍小傻蛋11",0,6);
            fw.write("\r\n");
            char[] buffer ={'谢','睿','妍'};
            fw.write(buffer);
            fw.write("\r\n");
            fw.write(buffer,0,2);
            fw.write("\r\n");
        } catch (Exception e) {
            e.printStackTrace();
        }


    }
}
